<template>
  <el-card shadow="never" class="aui-card--fill">
    <div style="margin-top:6%;margin-left:30%;">
      <el-form ref="tableData" :model="tableData" label-width="120px" size="big">
        <el-form-item label="学生id  :   "  prop="susername">
          {{ tableData.susername }}
          <!-- <el-input v-model="tableData.susername" readonly></el-input> -->
        </el-form-item>
        <el-form-item label="学生姓名  :   "  prop="stuName">
          {{tableData.stuName}}
          <!-- <el-input v-model="tableData.stuName" readonly></el-input> -->
      </el-form-item>
      <el-form-item label="指导成绩  :   "  prop="grade">
        {{tableData.grade}}
        <!-- <el-input v-model="tableData.grade" readonly ></el-input> -->
      </el-form-item>
      <el-form-item label="评阅成绩  :   "  prop="grade1">
        {{tableData.grade1}}
        <!-- <el-input v-model="tableData.grade1" readonly></el-input> -->
      </el-form-item>
      <el-form-item label="答辩成绩  :   "  prop="grade2">
        {{tableData.grade2}}
        <!-- <el-input v-model="tableData.grade2" readonly></el-input> -->
      </el-form-item>
      <el-form-item label="总成绩  :   " prop="average">
        {{tableData.average}}
          <!-- <el-input v-model="tableData.average" readonly></el-input> -->
      </el-form-item>
      </el-form>
    </div>
  </el-card>
</template>
<!-- <template>
    <div>
      <el-table
          fixed
          stripe
          border
          :cell-style="{textAlign: 'center'}"
          :header-cell-style="{textAlign: 'center'}"
          :height="450"
          :data="tableData"
          tooltip-effect="dark"
          style="width: 100%">
        <el-table-column  prop="susername"  label="学生id"></el-table-column>
        <el-table-column  prop="stuName"  label="学生姓名"></el-table-column>
        <el-table-column  prop="grade"  label="指导成绩"></el-table-column>
        <el-table-column  prop="grade1"  label="评阅成绩"></el-table-column>
        <el-table-column  prop="grade2"  label="答辩成绩"></el-table-column>
        <el-table-column  prop="average"  label="学生成绩"></el-table-column>
      </el-table>
    </div>
  </template> -->
  
<script>
  import servicesApi from '@/services/servicesApi';
  export default {
      data() {
      return {
        tableData: 
          {
          susername: '11',
          stuName: '',
          grade: '',
          grade1: '',
          grade2: '',
          average: ''
          }
        
      }
    },
    created() {
      this.stufindgrade()//生命周期
    },
    methods: {
      // 请求列表
       stufindgrade() {
         servicesApi.stufindgradeApi().then(res => {
           // console.log(res.data)
           let code =res.data.code
           let data = res.data.data
           if (code === 200) {
           this.tableData = data[0]
           // console.log(this.tableData)
           } else {
             this.tableDate = []
              this.$message.error(res.data.msg)
           }
         })
       }
    },
  };
  </script>

